package com.itheima.d2_byte_stream;

import java.io.FileInputStream;
import java.io.IOException;

public class FileInputStream2Practice {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("day09file-io-app/file/File01.txt");

        int len;
        byte[] buf = new byte[1024];
        while ((len = fis.read(buf)) != -1) {
            String str = new String(buf, 0, len);
            System.out.println("str = " + str);
        }

        fis.close();
    }
}
